/*=============== 字体 ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;300;400;500;600;700&display=swap");

/*========== css变量 ==========*/
:root {
  --header-height: 5rem;

  --primary-color: #a1ff69;
  --secondary-clolr: #13252f;
  --heading-color: #fff;
  --body-bg: #13252f;
  --text-color: #acb2b2;
  --font-name: "Montserrat", sans-serif;
  --card-bg: #152833;

  --h1-font-size: 2.5rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.5rem;
  --bigest-font-size: 1.3rem;
  --big-font-size: 1.2rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.9rem;
  --smallest-font-size: .8125rem;

  --z-tooltip: 10;
  --z-index: 100;
}

/*========== 基础样式 =========*/
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  background: var(--body-bg);
  font-family: var(--font-name);
}

a {
  text-decoration: none;
  color: unset;
}

ul {
  list-style: none;
}

img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

p {
  color: var(--text-color);
  font-size: var(--small-font-size);
  line-height: 28px;
}

h1,
h2,
h3,
h4 {
  color: var(--heading-color);
  font-weight: 500;
}


/*========== 可复用css ==========*/
.container {
  width: 1140px;
  margin: auto;
  padding: 0 1.5rem;
}

.highlight {
  color: var(--primary-color);
}

section {
  padding: 5rem 0;
}

/*========== header & nav ==========*/
.nav {
  width: 100%;
  z-index: var(--z-index);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.nav-menu {
  display: flex;
  align-items: center;
  column-gap: 2.7rem;
}

.nav-link {
  color: var(--text-color);
  font-weight: 500;
  cursor: pointer;
  transition: .3s;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-item .active-link {
  position: relative;
  color: #fff;
  z-index: 1;
}

.active-link::before {
  position: absolute;
  content: "";
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
  top: 120%;
  left: 0;
  z-index: 99;
}

.mobile-menu {
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: none;
}

.nav.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  background: var(--card-bg);
}

/*========== hero section ==========*/
.hero-wrapper {
  display: flex;
  justify-content: space-between;
  column-gap: 2rem;
}

.hero-content,
.hero-img {
  width: 50%;
}

.hero-content h2 {
  font-size: var(--h2-font-size);
  line-height: 65px;
}

.hero-content p {
  margin-top: 40px;
}

.hero-btns {
  display: flex;
  align-items: center;
  column-gap: 2rem;
  margin-top: 40px;
}

.view-more-btn {
  padding: 10px 35px;
  background-color: var(--primary-color);
  border-radius: 5px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary-clolr);
  cursor: pointer;
}

.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
  border: 5px solid #689e48;
  box-shadow: 2px 2px 10px -2px #689e48;
  cursor: pointer;
}

.hero-content {
  padding-top: 40px;
}

/*========== popular ==========*/
.dishes-section-top {
  text-align: center;
  margin-bottom: 50px;
}

.dishes-section-top h2 {
  font-size: var(--h2-font-size);
  font-weight: 500;
}

.dishes-wrapper {
  display: flex;
  align-items: center;
  column-gap: 1.5rem;
}

.dish-item {
  display: flex;
  column-gap: 1rem;
  width: 33%;
  padding: 20px;
  border-radius: 5px;
  background: var(--card-bg);
  cursor: pointer;
  transition: .3s;
}

.dish-img {
  width: 25%;
}

.ratings {
  display: flex;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.ratings span i {
  color: var(--primary-color);
}

.dish-content-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dish-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.dish-content {
  flex: 1;
}

.add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--primary-color);
  color: var(--secondary-color);
  cursor: pointer;
  border-radius: 5px;
}

.add-to-cart i {
  font-weight: 600;
}

.dish-item:nth-child(2) .dish-img img,
.dish-item:nth-child(3) .dish-img img {
  width: 150%;
  margin-left: -15px;
}

.dish-item:hover {
  transform: translateY(-1rem);
}

/*========== about us ==========*/
.about-wrapper {
  display: flex;
  align-items: center;
  column-gap: 2rem;
}

.about-img,
.about-content {
  width: 50%;
}

.about-content h3 {
  font-size: var(--h3-font-size);
  line-height: 50px;
  margin-bottom: 20px;
}

.learn-more {
  margin-top: 40px;
  padding: 10px 35px;
  font-size: var(--normal-font-size);
  border: none;
  background-color: var(--primary-color);
  border-radius: 5px;
  cursor: pointer;
}

.learn-more a {
  color: var(--secondary-clolr);
  font-weight: 600;
}

/*========== menu ==========*/
.menu-section-top {
  margin-bottom: 50px;
}

.menu-section-top h2 {
  font-size: var(--h2-font-size);
}

.menu-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.menu-item {
  width: 33%;
  padding: 20px;
  background-color: var(--card-bg);
  border-radius: 5px;
  cursor: pointer;
  transition: .3s;
}

.menu-item:hover {
  transform: translateY(-1rem);
}

.menu-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 15px;
}

.menu-card-bottom .ratings {
  margin-bottom: 10px;
}

/*========== offer ==========*/
.offer-wrapper {
  display: flex;
  column-gap: 2rem;
  align-items: center;
}

.offer-content,
.offer-img {
  width: 50%;
}

.offer-content h2 {
  font-size: var(--h2-font-size);
  line-height: 50px;
  margin-bottom: 30px;
}

.offer-content p {
  margin-bottom: 40px;
}

/*========== blog ==========*/
.blog-top {
  margin-bottom: 50px;
  text-align: center;
}

.blog h2 {
  font-size: var(--h2-font-size);
}

.blog-wrapper {
  display: flex;
  align-items: center;
  column-gap: 2rem;
}

.blog-item {
  width: 33%;
  border: 1px solid var(--card-bg);
  border-radius: 5px;
  padding: 20px;
}

.blog-img img {
  border-radius: 5px;
}

.blog-content h3 {
  margin-top: 10px;
  margin-bottom: 20px;
}

.blog-content p {
  margin-bottom: 20px;
}

.read-more {
  color: var(--primary-color);
  font-size: var(--small-font-size);
  cursor: pointer;
}

/*========== footer ==========*/
.footer {
  padding-top: 60px;
  padding-bottom: 30px;
  background: var(--card-bg);
}

.footer-wrapper {
  display: flex;
  column-gap: 2rem;
}

.footer-logo {
  width: 40%;
}

.footer-box {
  width: 15%;
}

.footer-logo p {
  margin-top: 15px;
  margin-bottom: 20px;
}

.subscribe-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
}

.subscribe-box input {
  padding: 15px 7px;
  border: none;
  outline: none;
  background: transparent;
  color: #acb2b2;
  font-size: var(--small-font-size);
}

.subscribe-box input::placeholder {
  color: #acb2b2;
}

.subscribe-btn {
  padding: 15px 25px;
  background: var(--primary-color);
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  outline: none;
  border-radius: 0px 5px 5px 0px;
  cursor: pointer;
}

.footer-link-title {
  margin-bottom: 20px;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  row-gap: 1rem;
}

.footer-link {
  color: var(--text-color);
  font-size: var(--small-font-size)
}

.footer-copyright {
  text-align: center;
  margin-top: 50px;
}

/* 动画 */
.section {
  transition: transform 1s, opacity 1s;
}

.section-hidden {
  opacity: 0;
  transform: translateY(8rem);
}

/* 响应式 */
@media screen and (max-width: 1024px) {
  .container {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  section {
    padding: 4rem 0;
  }

  .nav-wrapper {
    height: calc(var(--header-height) - 1rem);
  }

  .navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: #13252fa8;
    z-index: var(--z-index);
    transition: .4s;
  }

  .nav-menu {
    position: absolute;
    width: 250px;
    height: 100%;
    top: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    row-gap: 2.7rem;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index);
  }

  .nav-link {
    font-size: var(--small-font-size);
  }

  .show-menu {
    right: 0;
  }

  .mobile-menu {
    display: block;
  }

  .hero-content h2,
  .offer-content h2 {
    font-size: 2rem;
    line-height: 40px;
  }

  .dishes-section-top h2,
  .menu-section-top h2,
  .blog-top h2 {
    font-size: 1.5rem;
  }

  .dish-content h3 {
    font-size: 0.9rem;
  }

  .dish-price {
    font-size: 1rem;
  }

  .ratings span i {
    font-size: 0.8rem;
  }

  .ratings {
    margin-bottom: 10px;
  }

  .add-to-cart {
    width: 25px;
    height: 25px;
  }

  .about-content h3 {
    font-size: 1.4rem;
    line-height: 35px;
  }

  .view-more-btn,
  .learn-more {
    padding: 8px 30px;
    font-size: 0.8rem;
  }

  .logo h1 {
    font-size: 1.2rem;
  }

  .menu-item h3 {
    font-size: 1rem;
  }

  .menu-card-bottom {
    margin-top: 0;
  }

  .blog-content h3 {
    font-size: 1rem;
  }

  .blog-content p {
    line-height: 25px;
    font-size: 0.8rem;
  }

  .blog-item {
    padding: 0;
    border: none;
  }

  .footer-logo {
    width: 100%;
  }

  .footer-wrapper {
    flex-wrap: wrap;
    row-gap: 2rem;
  }

  .footer-box {
    width: 30%;
  }

  .footer-logo input {
    padding: 8px;
    font-size: 0.8rem;
  }

  .subscribe-box {
    width: 100%;
  }

  .subscribe-btn {
    padding: 8px 30px;
    font-size: 0.8rem;
  }

  .footer-link-title {
    font-size: 1rem;
  }

  .footer-link {
    font-size: 0.8rem;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 576px) {
  .hero-content,
  .hero-img,
  .about-content,
  .about-img,
  .offer-content,
  .offer-img {
    width: 100%;
  }

  .hero-wrapper,
  .about-wrapper,
  .offer-wrapper {
    flex-wrap: wrap;
  }

  .hero-content {
    padding-top: 0;
    margin-bottom: 40px;
  }

  .dish-item,
  .menu-item,
  .blog-item {
    width: 100%;
  }

  .dishes-wrapper {
    flex-wrap: wrap;
    row-gap: 1.5rem;
  }

  .menu-wrapper,
  .blog-wrapper {
    flex-wrap: wrap;
    row-gap: 1.5rem;
  }

  .offer-content {
    margin-bottom: 40px;
  }

  .footer-box {
    width: 45%;
  }
}